package com.xm.demo01.springboot_demo01.controllers;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * IndexController.class<br>
 * 学习springboot01
 *
 * @author XM
 * @version 1.0
 * @since 2019/6/28 16:37
 */
@RequestMapping(value = "/index")
@RestController
public class IndexController {
    @RequestMapping(value = "test01")
    public String Index01() {
        return "this is test SpringBoot Demo ";
    }

    @RequestMapping(value = "/test02")
    public String Index02() {
        return "this is test spring boot demo02";
    }

    @RequestMapping(value = "/test03")
    public Map<String, Object> Index03() {
        Map<String, Object> map = new HashMap<>();
        map.put("id", 1);
        map.put("msg","测试-还-原-配置文件");
        map.put("time", new Date());
        return map;
    }
}
